3.2.63 \(\int (a+b \sec (c+d x)) \sin (c+d x) \, dx\) [163]

Optimal. Leaf size=26 \[ -\frac {a \cos (c+d x)}{d}-\frac {b \log (\cos (c+d x))}{d} \]

[Out]

-a*cos(d*x+c)/d-b*ln(cos(d*x+c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {3957, 2800, 45} \begin {gather*} -\frac {a \cos (c+d x)}{d}-\frac {b \log (\cos (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])*Sin[c + d*x],x]

[Out]

-((a*Cos[c + d*x])/d) - (b*Log[Cos[c + d*x]])/d

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int (a+b \sec (c+d x)) \sin (c+d x) \, dx &=-\int (-b-a \cos (c+d x)) \tan (c+d x) \, dx\\ &=\frac {\text {Subst}\left (\int \frac {-b+x}{x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (1-\frac {b}{x}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a \cos (c+d x)}{d}-\frac {b \log (\cos (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 37, normalized size = 1.42 \begin {gather*} -\frac {a \cos (c) \cos (d x)}{d}-\frac {b \log (\cos (c+d x))}{d}+\frac {a \sin (c) \sin (d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])*Sin[c + d*x],x]

[Out]

-((a*Cos[c]*Cos[d*x])/d) - (b*Log[Cos[c + d*x]])/d + (a*Sin[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 26, normalized size = 1.00

method result size
derivativedivides \(\frac {-\frac {a}{\sec \left (d x +c \right )}+b \ln \left (\sec \left (d x +c \right )\right )}{d}\) \(26\)
default \(\frac {-\frac {a}{\sec \left (d x +c \right )}+b \ln \left (\sec \left (d x +c \right )\right )}{d}\) \(26\)
risch \(i b x +\frac {2 i b c}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}-\frac {a \cos \left (d x +c \right )}{d}\) \(45\)
norman \(\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {b \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(89\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))*sin(d*x+c),x,method=_RETURNVERBOSE)

[Out]

1/d*(-a/sec(d*x+c)+b*ln(sec(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 23, normalized size = 0.88 \begin {gather*} -\frac {a \cos \left (d x + c\right ) + b \log \left (\cos \left (d x + c\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x, algorithm="maxima")

[Out]

-(a*cos(d*x + c) + b*log(cos(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]
time = 4.82, size = 25, normalized size = 0.96 \begin {gather*} -\frac {a \cos \left (d x + c\right ) + b \log \left (-\cos \left (d x + c\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x, algorithm="fricas")

[Out]

-(a*cos(d*x + c) + b*log(-cos(d*x + c)))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \sin {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x)

[Out]

Integral((a + b*sec(c + d*x))*sin(c + d*x), x)

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 32, normalized size = 1.23 \begin {gather*} -\frac {a \cos \left (d x + c\right )}{d} - \frac {b \log \left (\frac {{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))*sin(d*x+c),x, algorithm="giac")

[Out]

-a*cos(d*x + c)/d - b*log(abs(cos(d*x + c))/abs(d))/d

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 23, normalized size = 0.88 \begin {gather*} -\frac {a\,\cos \left (c+d\,x\right )+b\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)*(a + b/cos(c + d*x)),x)

[Out]

-(a*cos(c + d*x) + b*log(cos(c + d*x)))/d

________________________________________________________________________________________